package com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow;

import com.glsc.ngateway.common.base.domain.mysql.gateway.FlowFormBaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * 供应商评级信息表(VendorRateDetail)实体类
 *
 * @author zzp
 * @since 2023-12-06 10:06:08
 */

@Data
@Entity
@ToString(callSuper = true)
@Where(clause = "deleted = 0")
@SQLDelete(sql = "update t_gw_flow_form_vendor_rate_main set deleted = 0 where id=?")
@SQLDeleteAll(sql = "update t_gw_flow_form_vendor_rate_main set deleted = 0 where id=?")
@Table(name = "t_gw_flow_form_vendor_rate_main")
@org.hibernate.annotations.Table(appliesTo = "t_gw_flow_form_vendor_rate_main", comment = "供应商评级信息表")
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class FlowFormVendorRateMain extends FlowFormBaseEntity {
    private static final long serialVersionUID = -45093077932154861L;

//    @Id
//    @Column(name = "rate_id")
//    @GeneratedValue(strategy = GenerationType.IDENTITY)
//    private Integer rateId;

    /**
     * 删除状态 字典：yesno
     */
    @ApiModelProperty(value = "删除状态 字典：yesno")
    @Column(name = "rate_delete", columnDefinition = "varchar(10) COMMENT '删除状态 字典：yesno'")
    private String rateDelete;


    /**
     * 评级盖章版文件
     */
    @ApiModelProperty(value = "评级盖章版文件")
    @Column(name = "doc_id_list", columnDefinition = "text COMMENT '评级盖章版文件'")
    private String docIdList;

    /**
     * 评价状态，0待评价、1已提交
     */
    @ApiModelProperty(value = "评价状态，0待评价、1已提交")
    @Column(name = "rate_status", columnDefinition = "varchar(10) COMMENT '评价状态，0待评价、1已提交'")
    private String rateStatus;
    /**
     * 评价人账号
     */
    @ApiModelProperty(value = "评价人账号")
    @Column(name = "rate_operator", columnDefinition = "varchar(20) COMMENT '评价人账号'")
    private String rateOperator;
    /**
     * 评价人姓名
     */
    @ApiModelProperty(value = "评价人姓名")
    @Column(name = "rate_operator_name", columnDefinition = "varchar(20) COMMENT '评价人姓名'")
    private String rateOperatorName;
    /**
     * 评级提交时间
     */
    @ApiModelProperty(value = "评级提交时间")
    @Column(name = "rate_time", columnDefinition = "datetime COMMENT '评级提交时间'")
    private Date rateTime;
    /**
     * 评级年份，202312/202303等，分别标识2023年度评价和季度评价，字典： vendor_rate_belong_date
     */
    @ApiModelProperty(value = "评级年份，202312/202303等，分别标识2023年度评价和季度评价，字典： vendor_rate_belong_date")
    @Column(name = "rate_belong_date", columnDefinition = "varchar(10) COMMENT '评级年份，202312/202303等，分别标识2023年度评价和季度评价，字典： vendor_rate_belong_date'")
    private String rateBelongDate;
    /**
     * 供应商编码
     */
    @ApiModelProperty(value = "供应商编码")
    @Column(name = "vendor_code", columnDefinition = "varchar(20) COMMENT '供应商编码'")
    private String vendorCode;

    /**
     * 供应商名称
     */
    @ApiModelProperty(value = "供应商名称")
    @Column(name = "vendor_name", columnDefinition = "varchar(200) comment '供应商名称'")
    private String vendorName;

    /**
     * 评级日期,yyyy-mm-dd
     */
    @ApiModelProperty(value = "评级日期,yyyy-mm-dd")
    @Column(name = "rate_date", columnDefinition = "char(10) COMMENT '评级日期,yyyy-mm-dd'")
    private String rateDate;

    /**
     * 项目或采购内容
     */
    @ApiModelProperty(value = "项目或采购内容")
    @Column(name = "rate_content", columnDefinition = "text COMMENT '项目或采购内容'")
    private String rateContent;

    /**
     * 合同名称
     */
    @ApiModelProperty(value = "合同名称")
    @Column(name = "contract_content", columnDefinition = "text COMMENT '合同名称'")
    private String contractContent;

    /**
     * 合同开始日,yyyy-mm-dd
     */
    @ApiModelProperty(value = "合同开始日,yyyy-mm-dd")
    @Column(name = "contract_begin_date", columnDefinition = "char(10) COMMENT '合同开始日,yyyy-mm-dd'")
    private String contractBeginDate;
    /**
     * 合同结束日,yyyy-mm-dd
     */
    @ApiModelProperty(value = "合同结束日,yyyy-mm-dd")
    @Column(name = "contract_end_date", columnDefinition = "char(10) COMMENT '合同结束日,yyyy-mm-dd'")
    private String contractEndDate;
    /**
     * 项目登记 字典：vendor_rate_project_level
     */
    @ApiModelProperty(value = "项目登记 字典：vendor_rate_project_level")
    @Column(name = "project_level", columnDefinition = "varchar(10) COMMENT '项目登记 字典：vendor_rate_project_level'")
    private String projectLevel;
    /**
     * 服务产品是否交付 字典：yesno
     */
    @ApiModelProperty(value = "服务产品是否交付 字典：yesno")
    @Column(name = "delivery_status", columnDefinition = "varchar(10) COMMENT '服务产品是否交付 字典：yesno'")
    private String deliveryStatus;
    /**
     * 评级套题编码
     */
    @ApiModelProperty(value = "评级套题编码")
    @Column(name = "exam_code", columnDefinition = "varchar(20) COMMENT '评级套题编码'")
    private String examCode;

    /**
     * 综合得分
     */
    @ApiModelProperty(value = "综合得分")
    @Column(name = "summary_score", columnDefinition = "int COMMENT '综合得分'")
    private Integer summaryScore;

    /**
     * 综合得分等级
     */
    @ApiModelProperty(value = "综合得分等级")
    @Column(name = "summary_score_level", columnDefinition = "varchar(10) COMMENT '项目登记 字典：vendor_rate_summary_score_level'")
    private String summaryScoreLevel;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @Column(name = "rate_remark", columnDefinition = "text COMMENT '备注'")
    private String rateRemark;

    /**
     * 申请日期
     */
    @ApiModelProperty(value = "申请日期,yyyy-mm-dd")
    @Column(name = "apply_date", columnDefinition = "char(10) COMMENT '申请日期,yyyy-mm-dd'")
    private String applyDate;

    /**
     * 强制删除原因
     */
    @ApiModelProperty(value = "强制删除原因")
    @Column(name = "delete_reason", columnDefinition = "text COMMENT '强制删除原因'")
    private String deleteResason;

    @Transient
    @ApiModelProperty(value = "供应商打分明细信息")
    private List<FlowFormVendorRateAnswer> vendorRateAnswerList;
}

